<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Performance Evaluation</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../mpi.html" title="Chapter 23. Boost.MPI">
<link rel="prev" href="design.html" title="Design Philosophy">
<link rel="next" href="history.html" title="Revision History">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="design.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mpi.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="history.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="mpi.performance"></a><a class="link" href="performance.html" title="Performance Evaluation">Performance Evaluation</a>
</h2></div></div></div>
<p>
      Message-passing performance is crucial in high-performance distributed computing.
      To evaluate the performance of Boost.MPI, we modified the standard <a href="http://www.scl.ameslab.gov/netpipe/" target="_top">NetPIPE</a>
      benchmark (version 3.6.2) to use Boost.MPI and compared its performance against
      raw MPI. We ran five different variants of the NetPIPE benchmark:
    </p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
          MPI: The unmodified NetPIPE benchmark.
        </li>
<li class="listitem">
          Boost.MPI: NetPIPE modified to use Boost.MPI calls for communication.
        </li>
<li class="listitem">
          MPI (Datatypes): NetPIPE modified to use a derived datatype (which itself
          contains a single <code class="computeroutput"><span class="identifier">MPI_BYTE</span></code>)
          rather than a fundamental datatype.
        </li>
<li class="listitem">
          Boost.MPI (Datatypes): NetPIPE modified to use a user-defined type <code class="computeroutput"><span class="identifier">Char</span></code> in place of the fundamental <code class="computeroutput"><span class="keyword">char</span></code> type. The <code class="computeroutput"><span class="identifier">Char</span></code>
          type contains a single <code class="computeroutput"><span class="keyword">char</span></code>,
          a <code class="computeroutput"><span class="identifier">serialize</span><span class="special">()</span></code>
          method to make it serializable, and specializes <code class="computeroutput"><a class="link" href="../doxygen/structboost_1_1mpi_1_1is__mpi__datatype.html" title="Struct template is_mpi_datatype">is_mpi_datatype</a></code>
          to force Boost.MPI to build a derived MPI data type for it.
        </li>
<li class="listitem">
          Boost.MPI (Serialized): NetPIPE modified to use a user-defined type <code class="computeroutput"><span class="identifier">Char</span></code> in place of the fundamental <code class="computeroutput"><span class="keyword">char</span></code> type. This <code class="computeroutput"><span class="identifier">Char</span></code>
          type contains a single <code class="computeroutput"><span class="keyword">char</span></code>
          and is serializable. Unlike the Datatypes case, <code class="computeroutput"><a class="link" href="../doxygen/structboost_1_1mpi_1_1is__mpi__datatype.html" title="Struct template is_mpi_datatype">is_mpi_datatype</a></code>
          is <span class="bold"><strong>not</strong></span> specialized, forcing Boost.MPI
          to perform many, many serialization calls.
        </li>
</ol></div>
<p>
      The actual tests were performed on the Odin cluster in the <a href="http://www.cs.indiana.edu/" target="_top">Department
      of Computer Science</a> at <a href="http://www.iub.edu" target="_top">Indiana University</a>,
      which contains 128 nodes connected via Infiniband. Each node contains 4GB memory
      and two AMD Opteron processors. The NetPIPE benchmarks were compiled with Intel's
      C++ Compiler, version 9.0, Boost 1.35.0 (prerelease), and <a href="http://www.open-mpi.org/" target="_top">Open
      MPI</a> version 1.1. The NetPIPE results follow:
    </p>
<p>
      <span class="inlinemediaobject"><img src="../../../libs/mpi/doc/netpipe.png"></span>
    </p>
<p>
      There are a some observations we can make about these NetPIPE results. First
      of all, the top two plots show that Boost.MPI performs on par with MPI for
      fundamental types. The next two plots show that Boost.MPI performs on par with
      MPI for derived data types, even though Boost.MPI provides a much more abstract,
      completely transparent approach to building derived data types than raw MPI.
      Overall performance for derived data types is significantly worse than for
      fundamental data types, but the bottleneck is in the underlying MPI implementation
      itself. Finally, when forcing Boost.MPI to serialize characters individually,
      performance suffers greatly. This particular instance is the worst possible
      case for Boost.MPI, because we are serializing millions of individual characters.
      Overall, the additional abstraction provided by Boost.MPI does not impair its
      performance.
    </p>
</div>
<div class="copyright-footer">Copyright © 2005-2007 Douglas Gregor,
      Matthias Troyer, Trustees of Indiana University<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at &lt;ulink url="http://www.boost.org/LICENSE_1_0.txt"&gt;
        http://www.boost.org/LICENSE_1_0.txt &lt;/ulink&gt;)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="design.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mpi.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="history.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
